/**
 * 
 */
package org.rollinitiative.d20.items;

import org.rollinitiative.d20.Adjustment;
import org.rollinitiative.d20.Adjustment.AdjustmentSource;
import org.rollinitiative.d20.schema.item.ArmorCategory;

/**
 * @author bebopjmm
 *
 */
public class Armor extends Item
{
    public enum EncumberanceCategory {
        LIGHT, MEDIUM, HEAVY;
        
        public static EncumberanceCategory mapArmorCategory(ArmorCategory category)
        {
            int categoryVal = category.enumValue().intValue();
            switch (categoryVal) {
            case ArmorCategory.INT_LIGHT:
                return LIGHT;
            case ArmorCategory.INT_MEDIUM:
                return MEDIUM;
            case ArmorCategory.INT_HEAVY:
                return HEAVY;
            default:
                return LIGHT;
            }
        }
    }

    private Adjustment armorBonus;
    
    private Adjustment skillPenalty;
    
    
    // maxDexBonus
    
    // arcaneFailure
    
    private EncumberanceCategory encumberance;

    
    public Armor()
    {
        super();
        this.armorBonus = new Adjustment(AdjustmentSource.EQUIPMENT, 0, "armor");
        this.skillPenalty = new Adjustment(AdjustmentSource.EQUIPMENT, 0, "armor");
    }

    /**
     * @return the armorBonus
     */
    public Adjustment getArmorBonus()
    {
        return armorBonus;
    }


    /**
     * @param armorBonus the armorBonus to set
     */
    public void setArmorBonus(int bonus)
    {
        this.armorBonus.setValue(bonus);
    }


    /**
     * @return the skillPenalty
     */
    public Adjustment getSkillPenalty()
    {
        return skillPenalty;
    }


    /**
     * @param skillPenalty the skillPenalty to set
     */
    public void setSkillPenalty(int penalty)
    {
        this.skillPenalty.setValue(penalty);
    }


    /**
     * @return the encumberance
     */
    public EncumberanceCategory getEncumberance()
    {
        return encumberance;
    }


    /**
     * @param encumberance the encumberance to set
     */
    public void setEncumberance(EncumberanceCategory encumberance)
    {
        this.encumberance = encumberance;
    }
    
    
}
